﻿using System;

namespace HandsonSoft.Web.WebFormsModelBinder
{
    [AttributeUsage(AttributeTargets.Property)]
    public class MapToControl : Attribute
    {
        public string ControlId { get; set; }

        public MapToControl()
        {
        }

        public MapToControl(string controlId)
        {
            if (string.IsNullOrEmpty(controlId))
                throw new ArgumentException();

            ControlId = controlId;
        }
    }
}
